Image encoding and decoding apparatus and method

ABSTRACT

An image encoding and decoding apparatus and method, the image encoding and decoding apparatus includes: an encoding unit adjusting at least one weight value adaptively to the number of bits expressing each pixel of a current image, predicting a pixel value of a block of interest by performing an operation on a pixel value of at least one block having a pixel value similar to the pixel value of the block of interest among blocks included in a previous image and the at least one adjusted weight value, and encoding the pixel value of the block of interest using the predicted pixel value of the block of interest; and a decoding unit adjusting the at least one weight value adaptively to the number of bits, restoring the predicted pixel value of the block of interest by performing an operation on the pixel value of the at least one block having the pixel value similar to the pixel value of the block of interest among blocks included in the restored previous image and the at least one adjusted weight value, and decoding the pixel value of the block of interest using the restored pixel value, wherein the previous image refers to an image displayed prior to a current image, and the block of interest is a target block of interest among blocks belonging to the current image.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the priority of Korean Patent Application No.2003-49129, filed on Jul. 18, 2003, and No. 2004-54472, filed on Jul.13, 2004, in the Korean Intellectual Property Office, the disclosures ofwhich are incorporated herein in their entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image processing, and moreparticularly, to an apparatus and method of encoding and decodingimages.

2. Description of the Related Art

A conventional image encoding and decoding apparatus utilizestime-prediction encoding and decoding when encoding temporallysuccessive images so as to remove redundant information between aprevious image and a current image. In the time-prediction encoding anddecoding method, the current image is subtracted from the previousimage, and the subtracted result is encoded and decoded. According toH.264/MPEG-4 Part 10 AVC standardization suggested by the Joint VideoTeam (JVT) of ISO/IEC MPEG and ITU-T VCEG, there are variousconventional time-prediction encoding and decoding methods (“Text ofISO/IEC FDIS 14496-10: Information Technology—Coding of audio-visualobjects—Part 10: Advanced Video Coding”, ISO/IEC JTC 1/SC 29/WG 11,N5555, March, 2003). One of these methods is a weighted predictionencoding method in which prediction encoding is performed on a currentimage using the result of multiplying or adding a pixel value of aprevious image by or to a constant value. This method provides excellentcompression efficiency when applied to a region where images graduallybecome dark or bright or to a region in which two scenes overlap whenone scene is replaced by another scene.

FIGS. 1A and 1B illustrate exemplary scene changing, in which FIG. 1Aillustrates an example of scene changing occurring while two differentscenes overlap, and FIG. 1B illustrates another example of scenechanging using fade-out and fade-in.

Compression efficiency can be greatly increased using the weightedprediction encoding method when a scene changing, as illustrated FIGS.1A and 1B, occurs. In the case of FIG. 1A, an intermediate image betweena previous scene and a following scene can be weightedprediction-encoded by applying proper weight values to the previous andfollowing scenes. In the case of FIG. 1B, a fading-out effect can beobtained by applying a proper weight value to the previous scene, and afading-in effect can be obtained by applying a proper weight value tothe following scene.

However, in the conventional method, the number of bits expressing asingle pixel of an image is fixed at 8. Therefore, it is practicallydifficult to use the conventional method in the current circumstancewhere the need for high quality images continues to increase.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, there is provided animage encoding and decoding apparatus using a weight value that isadapted to the number of bits expressing each pixel of an image.

According to an aspect of the present invention, there is provided animage encoding and decoding method using a weight value that is adaptedto the number of bits expressing each pixel of an image.

According to an aspect of the present invention, there is provided animage encoding and decoding apparatus including: an encoding unitadjusting at least one weight value adaptively to a number of bitsexpressing each pixel of a current image, predicting a pixel value of ablock of interest by performing an operation on the pixel value of atleast one block having the pixel value similar to the pixel value of theblock of interest among blocks included in a previous image and the atleast one adjusted weight value, and encoding the pixel value of theblock of interest using the predicted pixel value of the block ofinterest; and a decoding unit adjusting at least one weight valueadaptively to the number of bits, restoring the predicted pixel value ofthe block of interest by performing an operation on the pixel value ofat least one block having pixel value similar to the pixel value of theblock of interest among blocks included in the restored previous imageand the at least one adjusted weight value, and decoding the pixel valueof the block of interest using the restored pixel value, wherein theprevious image refers to an image displayed prior to the current image,and the block of interest is a target block of interest among blocksbelonging to the current image.

According to another aspect of the present invention, there is providedan image encoding and decoding method including: adjusting at least oneweight value adaptively to the number of bits expressing each pixel of acurrent image, predicting a pixel value of a block of interest byperforming an operation on a pixel value of at least one block havingpixel value similar to the pixel value of the block of interest amongblocks included in a previous image and the at least one adjusted weightvalue, and encoding the pixel value of the block of interest using theprediction value of the block of interest; and adjusting at least oneweight value adaptively to the number of bits, restoring the predictionvalue of the block of interest by performing an operation on the pixelvalue of at least one block having pixel value similar to the pixelvalue of the block of interest among blocks included in the restoredprevious image and the at least one adjusted weight value, and decodingthe pixel value of the block of interest using the restored pixel value,wherein the previous image refers to an image displayed prior to thecurrent image, and the block of interest is a target block of interestamong blocks belonging to the current image.

Additional aspects and/or advantages of the invention will be set forthin part in the description which follows and, in part, will be obviousfrom the description, or may be learned by practice of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects and advantages of the invention will becomeapparent and more readily appreciated from the following description ofthe embodiments, taken in conjunction with the accompanying drawings ofwhich:

FIGS. 1A and 1B illustrate examples of a scene changing;

FIG. 2 is a block diagram of an image encoding and decoding apparatusaccording to an embodiment of the present invention;

FIG. 3 is a flowchart illustrating an image encoding and decoding methodaccording to an embodiment of the present invention;

FIGS. 4A and 4B illustrate exemplary divisions of an image;

FIG. 5 is a block diagram of an embodiment of an encoding unit of FIG. 1according to the present invention;

FIG. 6 is a flowchart illustrating operation 20 of FIG. 3 according toan embodiment of the present invention;

FIGS. 7A and 7B illustrates a block of interest and adjacent blocks andspatial prediction definition;

FIG. 8 is a block diagram of an embodiment of an encoding weightedprediction unit shown in FIG. 5;

FIG. 9 is a flowchart illustrating operation 78 of FIG. 6 according toan embodiment of the present invention;

FIG. 10 is a block diagram of an embodiment of a decoding unit shown inFIG. 1 according to an embodiment of the present invention;

FIG. 11 is a flowchart illustrating operation 22 of FIG. 3 according toan embodiment of the present invention;

FIG. 12 is a block diagram of an embodiment of a decoding weightedprediction unit in FIG. 10 according to the present invention; and

FIG. 13 is a flowchart illustrating operation 202 in FIG. 11 accordingto an embodiment of the present invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Reference will now be made in detail to the embodiments of the presentinvention, examples of which are illustrated in the accompanyingdrawings, wherein like reference numerals refer to the like elementsthroughout. The embodiments are described below to explain the presentinvention by referring to the figures.

FIG. 2 is a block diagram of an image encoding and decoding apparatusaccording to an embodiment of the present invention. The image encodingand decoding apparatus includes an encoding unit 10 and a decoding unit12.

FIG. 3 is a flowchart illustrating an image encoding and decoding methodaccording to the present invention. The image encoding and decodingmethod includes encoding and decoding a pixel value of a block ofinterest using a weight value adjusted adaptively to the number of bits(operations 20 and 22).

The encoding unit 10 in FIG. 2 adjusts at least one weight valueadaptively to the number of bits expressing each pixel of an image,finds a block having a similar pixel value (hereinafter, “similarprevious block”) to a block of interest among blocks included in aprevious image (hereinafter, “previous blocks”), predicting the pixelvalue of the block of interest by performing an operation on the atleast one adjusted weight value and the pixel value of the found block,and encoding the pixel value of the block of interest using thepredicted pixel value corresponding to a result of the operation(operation 20). Here, a plurality of similar previous blocks may exist.A previous image refers to an image displayed prior to a current image.The block of interest refers to a target block of interest, i.e., ablock to be currently encoded, in the current image input via an inputport IN1. A pixel value may refer to a R (Red), G (Green), and B (Blue)value expressing the pixel, or a luminance signal (Y) and a colordifference signal (CbCr).

A plurality of pixels may exist in the block of interest. In this case,pixels having similar pixel values to the pixel value of each of thepixels included in the block of interest are found throughout thesimilar previous block.

FIGS. 4A and 4B illustrate exemplary divisions of an image, in whichFIG. 4A illustrates various divided macroblocks, and FIG. 4B illustratesfurther divisions of a divided macroblock in FIG. 4A.

Referring to FIG. 4A, a macroblock having 16×16 pixels is divided intovarious sizes having 16×8, 8×16, and 8×8 pixels to obtain motionvectors. Referring to FIG. 4B, the macroblock having 8×8 pixels isfurther divided to have 8×4, 4×8, and 4×4 pixels.

As described above, the image encoding and decoding apparatus accordingto the present invention divides a current image and a previous imageinto blocks having a predetermined size, as illustrated in FIG. 4A or4B, and processes the image in units of divided blocks.

FIG. 5 is a block diagram of an embodiment of the encoding unit 10 ofFIG. 2 according to the present invention. The encoding unit 10 of FIG.5 includes an encoding weighted prediction unit 40, an encoding spatialprediction unit 42, an encoding temporal prediction unit 44, an encodingselection unit 46, a subtraction unit 48, a transformation andquantization unit 50, an entropy encoding unit 52, an inversequantization and inverse transformation unit 54, and an encodingaddition unit 56, and an encoding deblocking unit 58.

FIG. 6 is a flowchart illustrating operation 20 in FIG. 3 according tothe present invention. Operation 20 includes predicting a pixel valueaccording to each mode (Operations 70 through 78), obtaining aprediction-encoded value (operation 80), and performing transformation,quantization, and entropy encoding (operations 82 and 84).

The encoding selection unit 46 in FIG. 5 selects as a prediction valueone of predicted pixel values, which are predicted in the encodingweighted prediction unit 40, the encoding spatial prediction unit 42,and the encoding temporal prediction unit 44, and outputs the selectedprediction value to the subtraction unit 48 and to the encoding additionunit 56 (operations 70 and 72).

For example, the encoding selection unit 46 determines whether a currentmode is an intra mode (operation 70). If the current mode is determinednot to be the intra mode, the encoding selection unit 46 determineswhether the current mode is an inter mode or a weighted prediction mode(operation 72).

If the current mode is determined to be the intra mode, the encodingselection unit 46 selects an output from the encoding spatial predictionunit 42. The encoding spatial prediction unit 42 predicts a pixel valueof the block of interest using the block of interest input via the inputport IN2 and an adjacent block input from the encoding addition unit 56and outputs the predicted pixel value to the encoding selection unit 46(operation 74). Here, the adjacent block refers to a block spatiallyadjacent to the block of interest among blocks included in the currentimage.

FIGS. 7A and 7B are for the convenience of understanding the encodingspatial prediction unit 42 in FIG. 5. FIG. 7A illustrates a block ofinterest 108 and adjacent blocks 100 through 106. FIG. 7B is forexplaining spatial prediction direction.

The block of interest 108 in FIG. 7A includes pixels P_(a) throughP_(q). The adjacent block 100 includes at least a pixel P₀ adjacent tothe block of interest 108, the adjacent block 102 includes at leastpixels P₁, P₂, P₃ and P₄ adjacent to the block of interest 108, theadjacent block 104 includes at least pixels P₅, P₆, P₇, and P₈ adjacentto the block of interest 108, and the adjacent block 106 includes atleast pixels P₉, P₁₀, P₁₁, and P₁₂ adjacent to the block of interest108.

There are 9 directions, from 0 to 8 in FIG. 7B, in which pixelsspatially adjacent to the block of interest 108 are projected to predicta pixel value of each of the pixels included in the block of interest108. Here, number 2 having no direction is not shown in FIG. 7B. Forexample, in the case of direction 0, pixels P₁, P₂, P₃, and P₄ arevertically projected to predict the pixel value of each of the pixelsincluded in the block of interest 108. That is, predicted pixel valuesof pixels P_(a), P_(e), P_(i), and P_(m) correspond to the pixel valueof pixel P₁, predicted pixel values of pixels P_(b), P_(f), P_(j), andP_(f) correspond to the pixel value of pixel P₂, predicted pixel valuesof pixels P_(c), P_(g), P_(k), and P_(o) correspond to the pixel valueof pixel P₃, predicted pixel values of pixels P_(d), P_(h), P_(i), andP_(q) correspond to the pixel value of pixel P₄. In all the otherdirections, projection is performed in the same manner to predict thepixel value of each of the pixels included in the block of interest 108.The encoding spatial prediction unit 42 outputs to the entropy encodingunit 52 various kinds of additional information used when predicting thepixel value of the block of interest 108, for example, projectiondirection, i.e., prediction direction.

When the current mode is determined to be the inter mode, the encodingselection unit 46 selects an output from the encoding temporalprediction unit 44. Here, the encoding temporal prediction unit 44predicts the pixel value of the block of interest using the block ofinterest input via the input port IN2 and the previous block input viathe input port IN3 and outputs the predicted pixel value of the block ofinterest to the encoding selection unit 46 (operation 76). For example,the encoding temporal prediction unit 44 estimates motion by comparingthe block of interest and the previous block and predicts the pixelvalue of each of the pixels included in the block of interest using theestimated motion. Here, various kinds of additional information usedwhen predicting the pixel value in the encoding temporal prediction unit44, for example, the estimated motion, are output to theentropy-encoding unit 52.

When the current mode is determined to be the weighted prediction mode,the encoding selection unit 46 selects an output from the encodingweighted prediction unit 40. Here, the encoding weighted prediction unit40 adjusts the weight value adaptively to the number of bits, predictsthe pixel value of the block of interest using the adjusted weightvalue, the block of interest input via the input port IN2 and theprevious blocks input via the input port IN3, and outputs the predictedpixel value to the encoding selection unit 46 (operation 78). To thisend, the number of bits may be input via an input port IN4.

Here, the previous block input via the input port IN3 to the encodingweighted prediction unit 40 and the encoding temporal prediction unit 44illustrated in FIG. 5 is a block that belongs to a previous imagepreviously decoded in the encoding deblocking unit 58. Various kinds ofadditional information used when predicting the pixel value in theencoding weighted prediction unit 40, for example, estimated motion, isoutput to the entropy-encoding unit 52.

According to the present invention, the encoding weighted predictionunit 40 may adjust the weight value in proportion to the number of bits.

FIG. 8 is a block diagram of an embodiment of the encoding weightedprediction unit 40 in FIG. 5 according to the present invention. Theencoding weighted prediction unit 40 includes first and second encodingweighted value generating units 120 and 122, an encoding weight valueselection portion 124, an encoding weight value adjusting portion 126,and an encoding pixel value prediction portion 128.

FIG. 9 is a flowchart illustrating operation 78 in FIG. 6 according tothe present invention. Operation 78 includes generating and adjustingthe weight value (operations 140 through 146) and performing anoperation on the adjusted weight value and a pixel value of the similarprevious block (operation 148).

The first and second encoding weight value generating portions 120 and122 illustrated in FIG. 8 generate weight values (operation 140). Inparticular, the first encoding weight value generating portion 120generates a fixed weight value and outputs the generated fixed weightvalue to the encoding weight value selection portion 124. At this time,the second encoding weight value generating portion 122 generates aweight value defined by a user (hereinafter, “user-defined weightvalue”) and outputs the generated user-defined weight value to theencoding weight value selection portion 124. To this end, the secondencoding weight generating unit 122 may receive the user-defined weightvalue via an input port IN5. Alternatively, the second encoding weightgenerating unit 122 may include a manipulation unit (not shown) that ismanipulated by the user to generate the weight value. The user-definedweight value, which is generated in the second encoding weight valuegenerating portion 122, is output via an output port OUT4 to the entropyencoding unit 52.

According to the present invention, the second encoding weightgenerating unit 122 may generate weight values, to be operated on thepixel values of similar previous blocks, differently according to thesimilar previous blocks.

After operation 140, the encoding weight selection unit 124 selects oneof the weight values generated in the first and second encoding weightvalue generating portions 120 and 122 and outputs the selected weightvalue to the encoding weight value adjusting portion 126. In particular,the encoding weight value selection portion 124 determines whether touse the fixed weight value generated in the first encoding weight valuegenerating portion 120 or the user-defined weight value generated in thesecond encoding weight value generating portion 122, selects the fixedweight value or the user-defined weight value in response to the resultof the determination, and outputs the selected weight value to theencoding weight value adjusting portion 126 (operation 142). Theencoding weight value selection portion 124 outputs the result of thedetermination via an output port OUT5 to the entropy-encoding unit 52.In particular, if the fixed weight value is determined to be used, theencoding weight value selection portion 124 selects the fixed weightvalue and outputs the selected fixed weight value to the encoding weightvalue adjusting portion 126. However, if the user-defined weight valueis determined to be used, the encoding weight value selection portion124 selects the user-defined weight value and outputs the selecteduser-defined weight value to the encoding weight value adjusting portion126.

The encoding weight value adjusting portion 126 adjusts the fixed weightvalue or the user-defined weight value adaptively to the number of bitsinput via an input port IN6 and outputs the adjusted weight value to theencoding pixel value prediction portion 128 (operation 144 or 146).

According to an embodiment of the present invention, the encoding weightvalue adjusting portion 126 may adjust the weight value adaptively tothe number of bits to represent the pixel value according to equation(1) below.W′=W·2^((N−M))  (1)where W is a weight value before the adjustment, W′ is a weight valueafter the adjustment, N is the number of bits, and M is a constant.

In general, images obtained using an image capturing device such as acamera are expressed in a predetermined size, that is, a number ofpixels, by sampling. As the number of bits required to express a valueof each pixel becomes greater, the range in which the pixel values canbe expressed becomes wider and a higher quality image can be expressed.In most cases, the number of bits is 8. The number of bits is increasedto 10 or 12 in the field of high quality image display. Consideringthis, the constant M in equation (1) may be, for example, 8, 10, or 12.

After operation 144 or 146, the encoding pixel value prediction portion128 performs an operation on a pixel value of at least one similarprevious block among the previous blocks input via an input port IN7 andthe adjusted weight value, determines the result of the operation as thepredicted pixel value of the block of interest, and outputs the resultvia an output port OUT6 to the encoding selection unit 46 (operation148).

According to the present invention, the encoding pixel value predictionportion 128 may predict the pixel value of the block of interest bymultiplying the pixel values of the similar previous blocks by theadjusted weight values and adding other adjusted weight values to theproducts. For example, the encoding pixel value prediction portion 128may predict the pixel value of the block of interest using equation (2)below. $\begin{matrix}{{E\left( {x,y} \right)} = {\sum\limits_{i = 1}^{r}\frac{{W_{i}^{\prime} \times {p_{i}\left( {x,y} \right)}} + O_{i}^{\prime}}{r}}} & (2)\end{matrix}$where E(x,y) represents a predicted pixel value of a pixel located at(x, y) among pixels belonging to the block of interest, p_(i)(x,y)represents a pixel value of a pixel located at (x,y) among pixelsbelonging to a similar previous block, W_(i)′ represents a weight valueadjusted from a weight value W_(i), and O_(i)′ is a weight valueadjusted from a weight value O_(i). In particular, W_(i) and O_(i) areweight values selected by the encoding weight value selection portion124, and W_(i)′ and O_(i)′ are weight values adjusted in the encodingweight value adjusting portion 126.

For example, when i=1 and i=2, the encoding weight value adjustingportion 126 may adjust weight values according to formula (3) or (4) toobtain adjusted weight values W₁′, W₂′, O₁′, and O₂′.W ₁ ′=W ₁·2^((N−M))W ₂ ′=W ₂·2^((N−M))O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M))  (3)W₁′=W₁W₂′=W₂O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M))  (4)

According to the present invention, when the similar previous blocks areincluded in the same previous image, the first encoding weight valuegenerating portion 120 may generate weight values W₁ and W₂ usingequation (5) below.W₁=W₂, O₁=O₂  (5)where, in the case of H.264, W₁=W₂=32 and O₁=O₂=0.

However, when the similar previous blocks are distributed in differentprevious image, the first encoding weight generating unit 120 generatesweight values according to a time difference between the time when eachof the similar previous images is displayed and the time when thecurrent image is displayed.

The encoding unit 10 of FIG. 5 predicts the pixel value of the block ofinterest using the encoding weighted prediction unit 40, the encodingspatial prediction unit 42, or the encoding temporal prediction unit 44,thereby increasing the encoding efficiency.

After operation 74, 76, or 78, the subtraction unit 48 subtracts thepredicted pixel value input from the encoding selection unit 46 from thepixel value of the block of interest input via the input port IN2according to equation (6) and outputs the subtracted result to thetransformation and quantization unit 50 as a prediction encoded value(operation 80).dn(x,y)=bn(x,y)−E(x,y)  (6)where dn(x,y) represents a prediction encoded value for an n^(th) blockof interest in the current image and bn(x,y) represents a pixel value ofthe pixel located at (x,y) among pixels belonging to the n^(th) block ofinterest in the current image.

After operation 80, the transformation and quantization unit 50transforms the prediction-encoded value input from the subtraction unit48, quantizes the transformed result, and outputs the quantized resultor quantized value to both the entropy encoding unit 52 and the inversequantization and inverse transformation unit 54 (operation 82). Here,the transformation may be discrete cosine transformation (DCT), integertransformation of H.264, etc.

After operation 82, the entropy encoding unit 52 performs entropyencoding on the transformed and quantized result output from thetransformation and quantization unit 50 and outputs the entropy-encodedresult in the form of bitstreams via an output port OUT 2 to thedecoding unit 12 (operation 84). For example, amount of errors and/orthe number of bits included in the entropy-encoded result output throughan output port OUT2 from the entropy encoding unit 52 may differaccording to whether the encoding weight selection unit 124 of FIG. 8selects the fixed weight value or the user-defined weight value.Therefore, after the user perceives the amount of errors and/or thenumber of bits included in the entropy-encoded result when the fixedweight value is selected in the encoding weight selection unit 124 andperceives the amount of errors and/or the number of bits included in theentropy-encoded result when the user-defined weight value is selected inthe encoding weight selection unit 124, the user determines the weightvalue resulting in making the amount of errors and/or making the numberof bits included in the entropy-encoded result to be small, according tothe perceived results. Then, the user controls the encoding weightselection unit 124 in order for the encoding weight selection unit 124to select the determined weight value.

The entropy encoding unit 52 receives additional information from theencoding weighted prediction unit 40, the encoding spatial predictionunit 42, and the encoding temporal prediction unit 44, encodes thereceived additional information, and outputs the encoded result, whichis included in the bitstreams, via the output port OUT2 to the decodingunit 12. The reason why additional information, such as estimatedmotion, from the encoding weighted prediction unit 40 and the encodingtemporal prediction unit 44, is entropy-encoded in the entropy encodingunit 52 to be sent to the decoding unit 12 is for enabling the decodingunit 12 to find the similar previous block, which will be describedlater.

In operation 84, the inverse quantization and inverse transformationunit 54, the encoding addition unit 56, and the encoding deblocking unit58 of the encoding unit 10 perform the following operations so as torefer to previous images.

The inverse quantization and inverse transformation unit 54inverse-quantizes the quantized result input from the transformation andquantization unit 50, inverse-transforms the inverse quantized result,and outputs the inverse-transformed result as the result of restoringthe prediction-encoded value, to the encoding addition unit 56. Theencoding addition unit 56 performs an addition on the restoredprediction-encoded value input from the inverse quantization and inversetransformation unit 54 and the predicted pixel value input from theencoding selection unit 46, and outputs the result of the addition toboth the encoding deblocking unit 58 and the encoding spatial predictionunit 42.

The encoding deblocking unit 58 deblocks the result of the additionperformed in the encoding addition unit 56 and outputs the deblockedresult as the result of decoding the pixel value of the block ofinterest, via an output port OUT3. The deblocking performed in theencoding deblocking unit 58 is to eliminate a blocking phenomenon thathas occurred since the encoding unit 10 of FIG. 3 has processed imagesin units of blocks.

After operation 20, the decoding unit 12 adjusts at least one weightvalue adaptively to the number of bits, performs an operation on a pixelvalue of at least one block having a pixel value similar to a pixelvalue of the block of interest among the blocks included in a restoredprevious image and the at least one adjusted weight value to restore apredicted pixel value of the block of interest, and decodes the pixelvalue of the block of interest using the restored predicted pixel value(operation 22).

FIG. 10 is a block diagram of an embodiment 12 of the decoding unit 12of FIG. 1 according to the present invention. The decoding unit 12includes an entropy decoding unit 160, an inverse quantization andinverse transformation unit 162, a decoding temporal prediction portionunit 164, a decoding weighted prediction unit 166, a decoding spatialprediction unit 168, a decoding selection unit 170, a decoding additionunit 172, and a decoding deblocking unit 174.

FIG. 11 is a flowchart illustrating operation 22 illustrated in FIG. 3according to the present invention. Operation 22 includes performingentropy decoding and inverse quantization and inverse transformation(operations 190 and 192), restoring a pixel value according to each mode(operations 194 through 202), and decoding the encoded value (operations204 and 206).

The entropy encoding unit 160 of FIG. 10 performs entropy decoding onthe bitstreams input via an input port IN8 from the encoding unit 10 andoutputs the entropy-decoded result to the inverse quantization andinverse transformation unit 162 (operation 190). Here, various kinds ofadditional information included in the bitstreams are also decoded.

After operation 190, the inverse quantization and inverse transformationunit 162 performs inverse-quantization on the entropy-decoded resultinput from the entropy decoding unit 160, performs inversetransformation on the inverse-quantized result, and outputs theinverse-transformed result to the decoding addition unit 172 (operation192). Here, the inverse-transformed result output from the inversequantization and inverse transformation unit 162 is the result ofrestoring the prediction-encoded value.

After operation 192, the decoding selection unit 170 determines whetherthe mode in which the pixel value of the block of interest in theencoding unit 10 is an intra mode (operation 194). If the mode in whichthe pixel value of the block of interest in the encoding unit 10 isdetermined not to be the intra mode, the decoding selection unit 170determines whether the mode in which the pixel value of the block ofinterest in the encoding unit 10 is an inter mode or a weightedprediction mode (operation 196). To this end, the decoding selectionunit 170 may use additional information, which is the result of thedetermination performed in the encoding weight value selection portion124, encoded in the entropy encoding unit 52 and decoded in the entropydecoding unit 160. For example, the decoding selection unit 170 selectsas the restored predicted pixel value one of the predicted pixel valuesrestored in the decoding weighted prediction unit 166, the decodingspatial prediction unit 168, and the decoding temporal prediction unit164 in response to the additional information input from the entropydecoding unit 160 and outputs the selected result to the decodingaddition unit 172.

If the encoding mode is determined to be the intra mode, the decodingselection unit 170 selects the output from the encoding spatialprediction unit 168. The decoding spatial prediction unit 168 receivesrestored blocks included in the restored current image from the decodingaddition unit 172, restores the pixel value, predicted by the encodingunit 10, of the block of interest using blocks spatially adjacent to theblock of interest among the blocks received from the decoding additionunit 172, and outputs the restored result to the decoding selection unit170 (operation 198). To this end, the decoding spatial prediction unit168 may restore the pixel value of the block of interest usingadditional information corresponding to the direction of predictionamong various kinds of additional information restored in the entropydecoding unit 160.

If the encoding mode is determined to be the inter mode, the decodingselection unit 170 selects the output from the decoding temporalprediction unit 164. The decoding temporal prediction unit 164 restoresthe predicted pixel value of the block of interest using the block ofinterest and blocks included in the restored previous image input via aninput port IN9 and outputs the restored result to the decoding selectionunit 170 (operation 200). The blocks included in the restored previousimage input to the decoding weighted prediction unit 166 and thedecoding temporal prediction unit 164 via the input port IN9 in FIG. 10belong to the previous image decoded in the decoding deblocking unit174.

To perform the above-described operations, the decoding temporalprediction unit 164 may receive additional information such as estimatedmotion among various kinds of additional information decoded in theentropy-decoding unit 160 and restore the predicted pixel value of theblock of interest using the received additional information. Thedecoding temporal prediction unit 164 can find at least one block havinga pixel value similar to the pixel value of the block of interest amongthe blocks included in the restored previous image based on theadditional information corresponding to the estimated motion and canrestore the predicted pixel value of the block of interest using thefound block.

If the encoding mode is determined to be the weighted prediction mode,the decoding selection unit 170 selects the output from the decodingweighted prediction unit 166. The decoding weighted prediction unit 166adjusts at least one weight value adaptively to the number of bits,restores the predicted pixel value of the block of interest using theadjusted weight value, and outputs the restored result to the decodingselection unit 170 (operation 202).

According to the present invention, the decoding weighted predictionunit 166 in FIG. 10 may adjust the weight value in proportion to thenumber of bits.

FIG. 12 is a block diagram of an embodiment of the decoding weightedprediction unit 166 in FIG. 10 according to the present invention. Thedecoding weighted prediction unit 166 includes first and second decodingweight value generating portions 220 and 222, a decoding weight valueselection portion 224, a decoding weight value adjusting portion 226,and a decoding pixel value restoring portion 228.

FIG. 13 is a flowchart illustrating operation 202 in FIG. 11 accordingto the present invention. Operation 202 includes generating andadjusting weight values (operations 240 through 246) and performing anoperation on the adjusted weight value and the pixel value of at leastone block having pixel value that is similar to the pixel value of theblock of interest (operation 248).

The first and second decoding weight value generating portions 220 and222 generate the weight values (operation 240). For example, the firstdecoding weight value generating portion 220 generates a fixed weightvalue that is the same as the weight value generated in the firstencoding weight value generating portion 120 and outputs the generatedfixed weight value to the encoding weight value selection portion 124.Here, the weight value to be generated by the first encoding weightgenerating unit 120 and the first decoding weight value generatingportion 220 is predetermined.

When among blocks included in the restored previous image a plurality ofblocks having pixel values similar to the pixel value of the block ofinterest are included in the same restored previous image, the firstdecoding weight value generating portion 220 can generate the weightvalues according to equation (5). However, among blocks included in therestored previous image a plurality of blocks having pixel valuessimilar to the pixel values of the block of the interest are distributedin different restored previous images, the first decoding weight valuegenerating portion 220 generates the weight values according to the timedifference between the time when each of the similar previous images isdisplayed and the time when the current image is displayed.

The second decoding weight value generating portion 222 receives via aninput port IN10 from the entropy decoding unit 160 additionalinformation corresponding to the weight value generated in the secondencoding weight value generating portion 122 among various kinds ofadditional information decoded in the entropy decoding unit 160,generates the weight value using the received additional information,and outputs the generated weight value to the decoding weight valueselection portion 224. That is, the second decoding weight valuegenerating portion 222 restores the weight value generated in the secondencoding weight value generating portion 122 using the additionalinformation. The second decoding weight value generating portion 222 maygenerate weight values to be operated on pixel values of blocks havingpixel values similar to the pixel value of the block of interest amongthe blocks included in the restored previous image, differentlyaccording to the blocks having similar pixel values.

After operation 240, the decoding weight value selection portion 224selects one of the weight values generated in the first and seconddecoding weight value generating portions 220 and 222 and outputs theselected weight value to the decoding weight value adjusting portion226. To this end, the decoding weight value selection portion 224 mayreceive additional information, which is the result of the determinationin the encoding weight value selection portion 124, from the entropydecoding unit 160 via an input port IN11 and select one of the weightvalues generated in the first and second decoding weight valuegenerating portions 220 and 222 using the received additionalinformation. For example, if the weight value selected in the encodingweight value selection portion 124 is determined to be the user-definedweight value based on the additional information, the decoding weightvalue selection portion 224 selects the weight value generated in thesecond decoding weight value generating portion 222. However, if theweight value selected in the encoding weight value selection portion 124is determined to be the fixed weight value based on the additionalinformation, the decoding weight value selection portion 224 selects theweight value generated in the first decoding weight value generatingportion 220. In other words, the decoding weight value selection portion224 determines whether to use the fixed weight value or the user-definedweight value in response to the additional information, selects thefixed weight value or the user-defined weight value according to theresult of the determination, and outputs the selected weight value tothe decoding weight value adjusting portion 226 (operation 242).

The decoding weight value adjusting portion 226 adjusts at least onefixed weight value or at least one user-defined weight value adaptivelyto the number of bits input via an input port IN12, and outputs theadjusted weight value to the decoding pixel value restoring portion 228(operations 244 and 246). The decoding weight value adjusting portion226 may adjust the weight value adaptively to the number of bits usingequation (1), (3), or (4) above.

After operation 244 or 246, the decoding pixel value restoring portion228 performs an operation on the pixel value of at least one blockhaving a pixel value similar to the pixel value of the block of interestamong the blocks included in the restored previous image input via theinput port IN13 and the at least one adjusted weight value input fromthe decoding weight value adjusting portion 226, and outputs the resultof the operation, which is the result of restoring the predicted pixelvalue of the block of interest, to the decoding selection unit 170 viaan output port OUT8 (operation 248). To this end, the decoding pixelvalue restoring portion 228 receives from the entropy decoding unit 160additional information such as estimated motion among various kinds ofadditional information decoded in the entropy decoding unit 160 via aninput port IN13, and restores the predicted pixel value of the block ofinterest using the received additional information corresponding to theestimated motion. The decoding pixel value restoring portion 228 canfind at least one block having a pixel value similar to the pixel valueof the block of interest among the blocks included in the restoredprevious image based on the additional information corresponding to theestimated motion and restore the predicted pixel value of the block ofinterest using the found block.

When the encoding pixel value prediction portion 128 predicts the pixelvalue of the block of interest according to equation (2) above, thedecoding pixel value restoring portion 228 may restore the predictedpixel value of the block of interest by multiplying the pixel value ofat least one block having pixel value similar to the pixel value of theblock of interest among the blocks included in the restored precedingimage by at least one adjusted weight value and adding other adjustedweight values to the product.

After operation 198, 200, or 202, the decoding addition unit 172 addsthe restored predicted pixel value of the block of interest input fromthe decoding selection unit 170 and the inverse-transformed resultreceived from the inverse quantization and inverse transformation unit162, and outputs the result of the addition to both the decoding spatialprediction unit 168 and the decoding deblocking unit 174 (operation204).

After operation 204, the decoding deblocking unit 174 deblocks theresult of the addition performed in the decoding addition unit 172 andoutputs the deblocked result as the result of decoding the pixel valueof the block of interest via an output port OUT7 (operation 206).

In another embodiment according to the present invention, the encodingunit 10 of FIG. 5 may not include the encoding spatial prediction unit42, the encoding temporal prediction unit 44, and the encoding selectionunit 46. The decoding unit 12 of FIG. 10 may not include the decodingspatial prediction unit 168, the decoding temporal prediction unit 164,and the decoding selection unit 170. In this case, the pixel value ofthe block of interest predicted in the encoding weighted prediction unit40 is directly output to the subtraction unit 48 and the encodingaddition unit 56, and the pixel value of the block of interest restoredin the decoding weight prediction unit 166 is directly output to thedecoding addition unit 172.

In another embodiment according to the present invention, the encodingunit 10 of FIG. 5 may include one of the encoding spatial predictionunit 42 and the encoding temporal prediction unit 44, and the decodingunit 12 of FIG. 10 may include one of the decoding spatial predictionunit 168 and the decoding temporal prediction unit 164.

According to the present invention, when the structure in which thesubtraction unit 48, the transformation and quantization unit 50, theentropy encoding unit 52, the inverse quantization and inversetransformation unit 54, the encoding addition unit 56, and the encodingdeblocking unit 58 are included in the encoding unit 10 of FIG. 5 is oneembodiment which can encode the pixel value of the block of interestusing the predicted pixel value output from the encoding selection unit46. Also, the structure in which the entropy decoding unit 160, theinverse quantization and inverse transformation unit 162, the decodingaddition unit 172, and the decoding deblocking unit 174 are included inthe decoding unit 12 of FIG. 10 is one embodiment which can decode thepixel value of the block of interest. Therefore, the preset invention isnot limited to the structures shown in FIGS. 5 and 10.

An image encoding and decoding apparatus and method according to thepresent invention has been described in the above embodiments inconnection with the technology of standardization of ISO/IEC MPEG andH.264/MPEG-4 Part 10 AVC suggested by the Joint Video Team (JVT) ofITU-T VCEG. Each of the encoding deblocking unit 58 and the decodingdeblocking unit 174 in the image encoding and decoding apparatusaccording to the present invention corresponds to a declocking filter(not shown) disclosed in the standardization technology. However, thepresent invention is not limited to this standardization technology. Inparticular, the encoding spatial prediction unit 42, the encodingtemporal prediction unit 44, which are shown in FIG. 5, and the decodingtemporal prediction unit 164 and the decoding spatial prediction unit168, which are shown in FIG. 10, may use a different time and spatialpredicting method.

As described above, in an image encoding and decoding apparatus andmethod according to the present invention, an image can be encoded anddecoded using a weight value adjusted adaptively to change in the numberof bits expressing each pixel of the image. In other words, weightedprediction is performed using weight values that are adjusted byperforming an operation on weight values, W, W₁, W₂, O₁, and O₂, whichare used in a conventional weighted prediction encoding and decodingapparatus, and a constant value (1 or 2^(N−M)). Therefore, encoding anddecoding can be efficiently performed even using the codec of theconventional apparatus.

The present invention can be applied as a method, an apparatus and asystem. When the present invention is executed using software, elementsof the present invention are code segments for necessary operations.Programs or code segments may be stored in a processor readablerecording medium or may be transmitted over computer data signals thatare coupled with carrier waves in transmission medium or communicationnetwork. The processor readable recording medium is any data storagedevice that can store or transmit information which can be thereafterread by a computer system. Examples of the processor readable recordingmedium includes electronic circuit, semiconductor memory, read-onlymemory (ROM), flash memory, erasable ROM (EROM), floppy disks, opticaldisks, hard disks, optical fiber medium, and RF network. The computerdata signals include signals that can be propagated over a transmissionmedium, such as electronic network channel, optical fiber, air,electromagnetic field, and RF network.

While the present invention has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the present invention as defined by the following claims.

1. An image encoding and decoding apparatus comprising: an encoding unitadjusting at least one weight value adaptively to a number of bitsexpressing each pixel of a current image, predicting a pixel value of ablock of interest using a pixel value of at least one block having apixel value similar to the pixel value of the block of interest amongblocks included in a previous image and the at least one adjusted weightvalue, and encoding the pixel value of the block of interest using thepredicted pixel value of the block of interest; and a decoding unitadjusting the at least one weight value adaptively to the number ofbits, restoring the predicted pixel value of the block of interest usingthe pixel value of at least one block having the pixel value similar tothe pixel value of the block of interest among blocks included in arestored previous image and the at least one adjusted weight value, anddecoding the pixel value of the block of interest using the restoredpixel value, wherein the previous image refers to an image displayedprior to the current image, and the block of interest is a target blockof interest among blocks belonging to the current image.
 2. The imageencoding and decoding apparatus of claim 1, wherein the encoding unitand the decoding unit adjust the at least one weight value in proportionto the number of bits.
 3. The image encoding and decoding apparatus ofclaim 1, wherein the encoding unit comprises: an encoding weightedprediction unit adjusting the at least one weight value adaptively tothe number of bits and predicting the pixel value of the block ofinterest using the at least one adjusted weight value; an encodingspatial prediction unit predicting the pixel value of the block ofinterest using a block spatially adjusted to the block of interest amongblocks included in the current image; an encoding temporal predictionunit predicting the pixel value of the block of interest using the blockof interest and the blocks included in the previous image; and anencoding selection unit selecting as a predicted pixel value one of thepixel values predicted in the encoding weight prediction unit, theencoding spatial prediction unit, and the encoding temporal predictionunit, wherein the encoding unit encodes the pixel value of the block ofinterest using the predicted pixel value.
 4. The image encoding anddecoding apparatus of claim 3, wherein the encoding unit comprises: asubtraction unit subtracting the predicted pixel value from the pixelvalue of the block of interest and outputting a prediction-encodedvalue; a transformation and quantization unit transforming andquantizing the prediction-encoded value and outputting a transformed andquantized result; an entropy encoding unit performing entropy encodingon the transformed and quantized result and additional information andoutputting bitstreams to the decoding unit; an inverse quantization andinverse transformation unit performing inverse quantization and inversetransformation on the transformed and quantized result and outputting arestored prediction-encoded value; an encoding addition unit adding therestored prediction-encoded value to the predicted pixel value andoutputting a result of the addition; and an encoding deblocking unitdeblocking the result of the addition output from the encoding additionunit and outputting a decoded pixel value of the block of interest,wherein the additional information includes information regarding the atleast one block having the pixel value similar to the pixel value of theblock of interest among the blocks included in the previous image. 5.The image encoding and decoding apparatus of claim 4, wherein theencoding weighted prediction unit comprises: an encoding weight valueadjusting portion adjusting the weight value adaptively to the number ofbits; and an encoding pixel value prediction portion, using the pixelvalue of the at least one block having the pixel value similar to thepixel value of the block of interest among the blocks included in theprevious image and the adjusted weight value, outputting the predictedpixel value of the block of interest.
 6. The image encoding and decodingapparatus of claim 5, wherein the encoding weighted prediction unitfurther comprises: a first encoding weight value generating portiongenerating a fixed weight value; a second encoding weight valuegenerating portion generating a user-defined weight value; and anencoding weight value selection portion selecting one of the weightvalues generated in the first and second encoding weight valuegenerating portions and outputting the selected weight value to theencoding weight value adjusting portion.
 7. The image encoding anddecoding apparatus of claim 6, wherein the user-defined weight valuegenerated in the second encoding weight value generating portioncorresponds to the additional information.
 8. The image encoding anddecoding apparatus of claim 6, wherein the encoding weight valueadjusting portion adjusts the weight value adaptively to the number ofbits using the following equation:W′=W·2^((N−M)) where W is a weight value before the adjustment, W is aweight value after the adjustment, N is the number of bits, and M is aconstant.
 9. The image encoding and decoding apparatus of claim 6,wherein the encoding pixel value prediction portion predicts the pixelvalue of the block of interest by multiplying pixel values of blockshaving the pixel value similar to the pixel value of the block ofinterest among the blocks included in the previous image by the adjustedweight values and adding other adjusted weight values to a result of themultiplication.
 10. The image encoding and decoding apparatus of claim9, wherein the encoding weight value adjusting portion adjusts theweight values to be operated on the pixel values of the blocks havingthe pixel value similar to the pixel value of the block of interestamong the blocks included in the previous image adaptively to the numberof bits using the following equations:W ₁ ′=W ₁·2^((N−M))W ₂ ′=W ₂·2^((N−M))O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M)) where W₁′ and W₂′ represent the weight values afterthe adjustment to be used in the multiplication, W₁ and W₂ representweight values before the adjustment, and O₁′, and O₂′ represent theweight values after the adjustment to be added to the products of themultiplication, O₁ and O₂ represent weight values before the adjustment,N represents the number of bits, and M represents a constant.
 11. Theimage encoding and decoding apparatus of claim 9, wherein the encodingweight value adjusting portion adjusts the weight values to be operatedon the pixel values of the blocks having pixel value similar to thepixel value of the block of interest among the blocks included in theprevious image adaptively to the number of bits using the followingequations:W₁′=W₁W₂′=W₂O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M)) where W₁′ and W₂′ represent the weight values afterthe adjustment to be used in the multiplication, W₁ and W₂ representweight values before the adjustment, and O₁′, and O₂′ represent theweight values after the adjustment to be added to the products of themultiplication, O₁ and O₂ represent weight values before the adjustment,N represents the number of bits, and M represents a constant.
 12. Theimage encoding and decoding apparatus of claim 10, wherein when aplurality of blocks having the pixel value similar to the pixel value ofthe block of interest among the blocks included in the previous imageare included in the same previous image, the first encoding weight valuegenerating portion generates the weight values using the followingequation:W₁=W₂, O₁=O₂
 13. The image encoding and decoding apparatus of claim 10,wherein when the blocks having the pixel value similar to the pixelvalue of the block of interest among the blocks included in the previousimage are distributed in different previous images, the first encodingweight value generating portion generates the weight values according toa time difference between a time when each of the previous images isdisplayed and a time when the current image is displayed.
 14. The imageencoding and decoding apparatus of claim 6, wherein the second encodingweight value generating portion generates weight values to be operatedon the pixel values of the blocks having the pixel value similar to thepixel value of the block of interest among the blocks included in theprevious image, differently according to the blocks having the pixelvalue similar to the pixel value of the block of interest.
 15. The imageencoding and decoding apparatus of claim 6, wherein the decoding unitcomprises: a decoding weighted prediction unit adjusting the at leastone weight value adaptively to the number of bits and restoring thepredicted pixel value of the block of interest using the adjusted weightvalue; a decoding spatial prediction unit restoring the predicted pixelvalue of the block of interest using a block spatially adjacent to theblock of interest among blocks included in a restored current image; adecoding temporal prediction unit restoring the predicted pixel value ofthe block of interest using the block of interest and the blocksincluded in the restored previous image; and a decoding selection unitselecting as the restored predicted pixel value one of prediction valuespredicted in the decoding weight prediction unit, the decoding spatialprediction unit, and the decoding temporal prediction unit, wherein thedecoding unit decodes the pixel value of the block of interest using therestored predicted pixel value.
 16. The image encoding and decodingapparatus of claim 15, wherein the decoding unit further comprises: anentropy decoding unit performing entropy-decoding on the bitstreams andoutputting an entropy-decoded result; an inverse quantization andinverse transformation unit performing inverse-quantization andinverse-transformation on the entropy-decoded result and outputting aninverse-transformed result; a decoding addition unit adding the restoredpredicted pixel value and the inverse-transformed result and outputtinga bock included in the restored current image; and a decoding deblockingunit deblocking the block and outputting the pixel value of the block ofinterest.
 17. The image encoding and decoding apparatus of claim 16,wherein the decoding weighted prediction unit comprises: a decodingweight value adjusting portion adjusting the at least weight valueadaptively to the number of bits; and a decoding pixel value restoringportion, using the pixel value of the at least one block having thepixel value similar to the pixel value of the block of interest amongthe blocks included in the restored previous image and the at least oneadjusted weight value, outputting a restored predicted pixel value ofthe block of interest.
 18. The image encoding and decoding apparatus ofclaim 17, wherein the decoding weighted prediction unit furthercomprises: a first decoding weight value generating portion generatingthe fixed weight value; a second decoding weight value generatingportion generating the weight value using additional informationcorresponding to the weight value generated in the second encodingweight value generating portion among various kinds of additionalinformation decoded in the entropy decoding unit; and a decoding weightvalue selection portion selecting one of the weight values generated inthe first and second decoding weight value generating portions andoutputting the selected weight value to the decoding weight valueadjusting portion.
 19. The image encoding and decoding apparatus ofclaim 17, wherein the decoding weight value adjusting portion adjuststhe weight value adaptively to the number of bits using the followingequation:W′=W·2^((N−M)) where W is a weight value before the adjustment, W′ is aweight value after the adjustment, N is the number of bits, and M is aconstant.
 20. The image encoding and decoding apparatus of claim 18,wherein the decoding pixel value restoring portion restores thepredicted pixel value of the block of interest by multiplying pixelvalues of the blocks having the pixel value similar to the pixel valueof the block of interest among the blocks included in the restoredprevious image by the adjusted weight values and adding other adjustedweight values to a result of the multiplication.
 21. The image encodingand decoding apparatus of claim 20, wherein the decoding weight valueadjusting portion adjusts the weight values to be operated on the pixelvalues of the blocks having the pixel value similar to the pixel valueof the block of interest among the blocks included in the restoredprevious image adaptively to the number of bits using the followingequations:W ₁ ′=W ₁·2^((N−M))W ₂ ′=W ₂·2^((N−M))O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M)) where W₁′ and W₂′ represent the weight values afterthe adjustment to be used in the multiplication, W₁ and W₂ representweight values before the adjustment, and O₁′, and O₂′ represent theweight values after the adjustment to be added to the result of themultiplication, O₁ and O₂ represent weight values before the adjustment,N represents the number of bits, and M represents a constant.
 22. Theimage encoding and decoding apparatus of claim 20, wherein the decodingweight value adjusting portion adjusts the weight values to be operatedon the pixel values of the blocks having the pixel value similar to thepixel value of the block of interest among the blocks included in therestored previous image adaptively to the number of bits using thefollowing equations:W₁′=W₁W₂′=W₂O ₁ ′=O ₁·2^((N−M))O ₂ ′=O ₂·2^((N−M)) where W₁′ and W₂′ represent the weight values afterthe adjustment to be used in the multiplication, W₁ and W₂ representweight values before the adjustment, and O₁′, and O₂′ represent theweight values after the adjustment to be added to the result of themultiplication, O₁ and O₂ represent weight values before the adjustment,N represents the number of bits, and M represents a constant.
 23. Theimage encoding and decoding apparatus of claim 21, wherein when aplurality of blocks having the pixel value similar to the pixel value ofthe block of interest among the blocks included in the restored previousimage are included in the same previous image, the first decoding weightvalue generating portion generates the weight values using the followingequation:W₁=W₂, O₁=O₂
 24. The image encoding and decoding apparatus of claim 21,wherein when the blocks having the pixel value similar to the pixelvalue of the block of interest among the blocks included in the restoredprevious image are distributed in different restored previous images,the first decoding weight value generating portion generates the weightvalues according to a time difference between a time when each of therestored previous images is displayed and a time when the current imageis displayed.
 25. The image encoding and decoding apparatus of claim 18,wherein the second decoding weight value generating portion generatesweight values to be operated on the pixel values of the blocks havingpixel value similar to the pixel value of the block of interest amongthe blocks included in the restored previous image, differentlyaccording to the blocks having pixel value similar to the pixel value ofthe block of interest.
 26. An image encoding and decoding methodcomprising: adjusting at least one weight value adaptively to a numberof bits expressing each pixel of a current image, predicting a pixelvalue of a block of interest using a pixel value of at least one blockhaving a pixel value similar to the pixel value of the block of interestamong blocks included in a previous image and the at least one adjustedweight value, and encoding the pixel value of the block of interestusing the predicted pixel value of the block of interest; and adjustingthe at least one weight value adaptively to the number of bits,restoring the predicted pixel value of the block of interest using thepixel value of the at least one block having the pixel value similar tothe pixel value of the block of interest among blocks included in arestored previous image and the at least one adjusted weight value, anddecoding the pixel value of the block of interest using the restoredpixel value, wherein the previous image refers to an image displayedprior to a current image, and the block of interest is a target block ofinterest among blocks belonging to the current image.
 27. The imageencoding and decoding method of claim 26, wherein the weight value isadjusted in proportion to the number of bits.
 28. The image encoding anddecoding method of claim 26, wherein the encoding comprises: determiningwhether a current mode is an intra mode, an inter mode, or a weightedprediction mode; if the current mode is determined to be the intra mode,predicting the pixel value of the block of interest using a blockspatially adjacent to the block of interest among blocks included in thecurrent image; if the current mode is determined to be the inter mode,predicting the pixel value of the block of interest using the block ofinterest and the blocks included in the previous image; and if thecurrent mode is determined to be the weighted prediction mode, adjustingthe weight value adaptively to the number of bits and predicting thepixel value of the block of interest using the adjusted weight value,and the pixel value of the block of interest is encoded using thepredicted pixel value.
 29. The image encoding and decoding method ofclaim 28, wherein the encoding further comprises: after the predictingthe pixel value of the block of interest, subtracting the predictedpixel value from the pixel value of the block of interest and outputtinga predicted encoded value; performing transformation and quantization onthe predicted encoded value and outputting a quantized result; andperforming entropy-encoding on the quantized result and additionalinformation and outputting an entropy-encoded result in form ofbitstreams, wherein the additional information includes informationregarding the at least one block having the pixel value similar to thepixel value of the block of interest among the blocks included in theprevious image.
 30. The image encoding and decoding method of claim 29,wherein the predicting the pixel value of the block of interest in theweighted prediction mode comprises: if the current mode is determined tobe the weighted prediction mode, generating a fixed weight value and auser-defined weight value; determining whether to use the fixed weightvalue or the user-defined weight value; if the fixed weight value isdetermined to be used, adjusting the fixed weight value adaptively tothe number of bits; if the user-defined weight value is determined to beused, adjusting the user-defined weight value adaptively to the numberof bits; and predicting the pixel value of the block of interest usingthe pixel value of the at least one block having the pixel value similarto the pixel value of the block of interest among the blocks included inthe previous image and the adjusted weight value.
 31. The image encodingand decoding method of claim 26 or 30, wherein the decoding comprises:determining whether the pixel value of the block of interest has beenencoded in an intra mode, an inter mode, or a weighted prediction mode;if determined that the pixel value of the block of interest has beenencoded in the intra mode, restoring the predicted pixel value of theblock of interest using a block spatially adjacent to the block ofinterest among blocks included in the restored current image; ifdetermined that the pixel value of the block of interest has beenencoded in the inter mode, restoring the predicted pixel value of theblock of interest using the block of interest and blocks included in therestored previous image; and if determined that the pixel value of theblock of interest has been encoded in the weighted prediction mode,adjusting the at least one weight value adaptively to the number ofbits, and restoring the predicted pixel value of the block of interestusing the adjusted weight value, and the pixel value of the block ofinterest is decoded using the restored prediction value.
 32. The imageencoding and decoding method of claim 31, wherein the decoding furthercomprises: performing entropy-decoding on the bitstreams and outputtingan entropy-decoded result; performing inverse quantization and inversetransformation on the entropy-decoded result and determining the mode inwhich the pixel value of the block of interest has been encoded andoutputting an inverse-transformed result; adding the restored predictedpixel value and the inverse-transformed result and outputting a resultof the addition as the blocks included in the restored current image;and deblocking the blocks included in the restored current image andoutputting the pixel value of the block of interest.
 33. The imageencoding and decoding method of claim 32, wherein the restoring thepredicted pixel value in the weighted prediction mode comprises: ifdetermined that the pixel value of the block of interest has beenencoded in the weighted prediction mode, generating the fixed weightvalue and the user-defined weight value using additional informationcorresponding to the user-defined weight value among various kinds ofdecoded additional information; determining whether to use the fixedweight value or the user-defined weight value; if the fixed weight valueis determined to be used, adjusting the fixed weight value adaptively tothe number of bits; if the user-defined weight value is determined to beused, adjusting the user-defined weight value adaptively to the numberof bits; and restoring the prediction value of the block of interestusing the pixel value of the at least one block having pixel valuesimilar to the pixel value of the block of interest among the blocksincluded in the restored previous image and the at least one adjustedweight value.
 34. The image encoding and decoding apparatus of claim 1,wherein the encoding unit comprises: an encoding weighted predictionunit adjusting the at least one weight value adaptively to the number ofbits and predicting the pixel value of the block of interest using theadjusted at least one weight value and directly outputting the predictedpixel value of the block of interest to a subtraction unit and to anencoding addition unit; and the subtraction unit subtracting the outputpredicted pixel value from the pixel value of the block of interest andoutputting a prediction-encoded value of the block of interest.
 35. Theimage encoding and decoding apparatus of claim 1, wherein the decodingunit comprises: a decoding weighted prediction unit adjusting the atleast one weight value adaptively to the number of bits and restoringthe predicted pixel value of the block of interest using the adjusted atleast one weight value and directly outputting the restored predictedpixel value of the block of interest to a decoding addition unit; thedecoding addition unit adding the restored predicted pixel value and aninverse-transformed result and outputting a block in a restored currentimage; and a decoding deblocking unit decoding and deblocking the blockin the restored current image and outputting the pixel value of theblock of interest.
 36. The image encoding and decoding apparatus ofclaim 11, wherein when a plurality of blocks having the pixel valuesimilar to the pixel value of the block of interest among the blocksincluded in the previous image are included in the same previous image,the first encoding weight value generating portion generates the weightvalues using the following equation:W₁=W₂, O₁=O₂
 37. The image encoding and decoding apparatus of claim 11,wherein when the blocks having the pixel value similar to the pixelvalue of the block of interest among the blocks included in the previousimage are distributed in different previous images, the first encodingweight value generating portion generates the weight values according toa time difference between a time when each of the previous images isdisplayed and a time when the current image is displayed.
 38. An imageencoding and decoding apparatus comprising: an encoding weightedprediction unit adjusting at least one weight value adaptively to thenumber of bits expressing each pixel of a current image, predicting apixel value of a block of interest using a pixel value of at least oneblock having a pixel value similar to the pixel value of the block ofinterest among blocks included in a previous image and the at least oneadjusted weight value, and encoding the pixel value of the block ofinterest using the predicted pixel value of the block of interest; and adecoding weighted prediction unit adjusting the at least one weightvalue adaptively to the number of bits, restoring the predicted pixelvalue of the block of interest using the pixel value of at least oneblock having the pixel value similar to the pixel value of the block ofinterest among blocks included in the restored previous image and the atleast one adjusted weight value, and decoding the pixel value of theblock of interest using the restored pixel value, wherein the previousimage refers to an image displayed prior to the current image, and theblock of interest is a target block of interest among blocks belongingto the current image.
 39. A computer readable recording medium encodedwith processing instructions implementing a method of encoding anddecoding an image, the method comprising: adjusting at least one weightvalue adaptively to a number of bits expressing each pixel of a currentimage, predicting a pixel value of a block of interest using a pixelvalue of at least one block having a pixel value similar to the pixelvalue of the block of interest among blocks included in a previous imageand the at least one adjusted weight value, and encoding the pixel valueof the block of interest using the predicted pixel value of the block ofinterest; and adjusting the at least one weight value adaptively to thenumber of bits, restoring the predicted pixel value of the block ofinterest using the pixel value of the at least one block having thepixel value similar to the pixel value of the block of interest amongblocks included in a restored previous image and the at least oneadjusted weight value, and decoding the pixel value of the block ofinterest using the restored pixel value, wherein the previous imagerefers to an image displayed prior to a current image, and the block ofinterest is a target block of interest among blocks belonging to thecurrent image.